how should you use content_for and yield

89

how should you use content_for and yield -

<div>
  <h1> This is the wrapper!</h1>
  <%= yield :my_content %>
</div>

how should you use content_for and yield -

<% content_for :my_content do %>
  This is the content.
<% end %>

Comments

Submit
0 Comments